import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick.Shapes 1.15

MainView {
    id: root
    width: 800
    height: 391
    property color btnColor: "#7080C0"
    property int btnHeight: 50
    property int btnWidth: 125
    signal loaderStart
    property bool normalSettingSaveOK:false

    onLoaderStart: {
    }
    Component.onCompleted:
    {
        loaderStart()
        statusLoder.source="DT45Status.qml"
    }

    Rectangle{
        id:mainRec
        width: 800
        height: 391
        visible:true
        color: "transparent"
        Loader
        {
            id: statusLoder
            asynchronous: true
            x: 0
            y: 0
            width: 691
            height: 350
            //source: "DT45Status.qml"
        }
ColumnLayout
{
    id: statusSwitchButton
    x: 688
    y: 8
    width:110
    height: 100
    Button
    {
        Layout.preferredWidth: 105
        Layout.preferredHeight: btnHeight
        // x: 152
        // y: 13
        text: qsTr("传感器")
        font.pixelSize: 18
        background: Rectangle{
            color: btnColor
                }
        onClicked: {
            statusLoder.source="DT45Status.qml"
        }
    }
//    Button
//    {
//        Layout.preferredWidth: 105
//        Layout.preferredHeight: btnHeight
//        // x: 152
//        // y: 13
//        text: qsTr("编码器")
//        font.pixelSize: 18
//        background: Rectangle{
//            color: btnColor
//                }
//        onClicked: {
//            statusLoder.source="EncoderStatus.qml"
//        }
//    }
}


       Button
        {
            id:btnReturn
            x: 688
            y: 281
            //x: 675
            //y: 20
            width: 100
            height: 100
            background: Rectangle{
                border.width: 0
                color: "#B0B0D0"
                    }

            text: qsTr("返回")
            font.pixelSize: 25
            palette.buttonText: "white"
            //Connections {
            //    target: btnReturn
                onClicked: {
                    //rectangle.selectedView = 4
                    bottomBar.selected=2
//                    myLoader.visible=false;
//                    myLoader.visible=true
                    myLoader.source="FunctionPanel.qml"
                }
            //}
        }

    }

    Timer{
       id:nsTimmer
       interval: 1000
       running: false
       repeat: false
       onTriggered: {
//           minGraduation.currentIndex = minGraduation.find(mymodbus.minGraduation)
//           decimalPlaces.currentIndex = decimalPlaces.find(mymodbus.decimalPlaces)
//           unit.currentIndex = unit.find(mymodbus.unit)
//           steadyStateFiltering.currentIndex = steadyStateFiltering.find(mymodbus.steadyStateFiltering)
//           digitalFiltering.currentIndex = digitalFiltering.find(mymodbus.digitalFiltering)
//           upperUpperLimit.text=mymodbus.upperUpperLimit
//           upperLimit.text= mymodbus.upperLimit
//           lowerLimit.text=mymodbus.lowerLimit
//           lowerLowerLimit.text =mymodbus.lowerLowerLimit
//           pwdSwitch.currentIndex= mytables.pwdSwitch
//           collectTime.text =mymodbus.collectTime
//           normalParaLoader.visible = false
       }
   }
}


